<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Insert title here</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css"
	href="${ pageContext.request.contextPath }/js/css/bootstrap.css">
<script type="text/javascript"
	src="${ pageContext.request.contextPath }/js/js/jquery-1.11.1.js"></script>
<script type="text/javascript"
	src="${ pageContext.request.contextPath }/js/js/bootstrap.js"></script>
<style type="text/css">
table {
	text-align: center;
}

body {
	background-image:
		url("${ pageContext.request.contextPath }/files/beijing.jpg");
	width: 80%;
	text-align: center;
	margin: 0 auto;
}

.error {
	border: 1px red dashed;
}
</style>
</head>
<body>
	<%@include file="/html/nav.html"%>
	<div class="col-xs-8 col-xs-offset-2">
		<div class="panel panel-primary" style="margin-top: 100px">
			<form action="query.tch" method="post" id="form">
				<div class="panel-heading">
					<div class="row">
						<div class="col-xs-3" style="margin-top: 15px">
							<span class="glyphicon glyphicon-th-list"></span> 教师查询
						</div>
						<div class="col-xs-8" style="margin-top: 10px">
							<div class="input-group">
								<input type="text" class="form-control" name="field">
								<div class="input-group-btn">
									<select class="btn btn-default" style="height: 34px"
										name="fieldType">
										<option>姓名</option>
										<option>艺名</option>
										<option>手机号</option>
										<option>邮箱</option>
										<option>QQ</option>
									</select>
									<button id="query" type="submit" class="btn btn-default">
										<span class="glyphicon glyphicon-search" style="height: 20px">
										</span>
									</button>
								</div>
							</div>
						</div>
					</div>
				</div>
			</form>
			<div class="panel-body">
				<table class="table table-bordered" border="1" id="tt">
					<tr>
						<th>姓名</th>
						<th>电话</th>
						<th>邮箱</th>
						<th>积分</th>
						<th>分配课程</th>
						<th>编辑</th>
						<th>删除</th>
					</tr>
					<c:forEach items="${userList}" var="user">
						<tr>
							<td>${user.getName()}</td>
							<td>${user.phone}</td>
							<td>${user.email}</td>
							<td>${user.getInfo().jifen}</td>
							<td><a href="/AAA/tea_course?userId=${user.id}"
								class="btn btn-primary">确认</a></td>

							<td><a href="/AAA/mgr.tea.edit?id=${user.id}"
								class="btn btn-primary">确定</a></td>
							<td><div class="modal" id="modaly${user.id}">
									<div class="modal-dialog"
										style="width: 500px; margin-top: 150px">
										<div class="modal-content">
											<div class="modal-header" style="background-color: royalblue">删除确定
												${user.name}</div>
											<div class="modal-body">你确定要删除教师[ ${user.name} ]吗？</div>
											<div class="modal-footer">
												<a href="/AAA/delete_teacher?id=${user.id}"
													class="btn btn-primary">确认</a> <a href=""
													class="btn btn-default">取消</a>
											</div>
										</div>
									</div>
								</div> <a class="btn btn-primary" data-toggle="modal"
								data-target="#modaly${user.id}">删除</a></td>
						</tr>
					</c:forEach>
				</table>
				<a href="searChcourse?page=1">首页</a>&nbsp&nbsp<a
					href="searChcourse?page=${page-1}">上一页</a>&nbsp&nbsp<a
					href="searChcourse?page=${page+1}">下一页</a>&nbsp&nbsp<a
					href="#?page=0">末页</a>
			</div>
		</div>
	</div>

</body>
</html>